package com.ruoyi.erp.domain.bo;

import com.ruoyi.common.annotation.query.EQ;
import com.ruoyi.common.annotation.query.LikeRight;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 商品业务对象 base_inventory
 *
 * @author chenyun
 * @date 2022-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("商品业务对象")
public class InventoryBo extends BaseEntity {

    /**
     * 编号
     */
    @EQ
    @ApiModelProperty(value = "编号", required = true)
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商品根级类型
     */
    @EQ
    @ApiModelProperty(value = "商品根级类型", required = true)
    @NotNull(message = "商品根级类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long invRootTypeId;

    /**
     * 商品类型
     */
    @EQ
    @ApiModelProperty(value = "商品类型", required = true)
    @NotNull(message = "商品类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long invTypeId;

    /**
     * 编码
     */
    @EQ
    @ApiModelProperty(value = "编码", required = true)
    @NotBlank(message = "编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String invCode;

    /**
     * 名称
     */
    @LikeRight
    @ApiModelProperty(value = "名称", required = true)
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String invName;

    /**
     * 型号
     */
    @LikeRight
    @ApiModelProperty(value = "型号", required = true)
    @NotBlank(message = "型号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String invModel;

    /**
     * 规格
     */
    @LikeRight
    @ApiModelProperty(value = "规格", required = true)
    @NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private String invSpac;

    /**
     * 可拆分
     */
    @LikeRight
    @ApiModelProperty(value = "可拆分", required = true)
    @NotBlank(message = "可拆分不能为空", groups = { AddGroup.class, EditGroup.class })
    private String separable;

    /**
     * 基本单位
     */
    @EQ
    @ApiModelProperty(value = "基本单位", required = true)
    @NotBlank(message = "基本单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String basicUnitCode;

    /**
     * 单位组
     */
    @EQ
    @ApiModelProperty(value = "单位组", required = true)
    @NotNull(message = "单位组不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long groupUnitCode;

    /**
     * 提前期
     */
    @EQ
    @ApiModelProperty(value = "提前期")
    private Integer invAdvance;

    /**
     * 计价方式
     */
    @EQ
    @ApiModelProperty(value = "计价方式", required = true)
    @NotBlank(message = "计价方式不能为空", groups = { AddGroup.class, EditGroup.class })
    private String valueType;

    /**
     * 机构id
     */
    @EQ
    @ApiModelProperty(value = "机构id", required = true)
    @NotNull(message = "机构id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orgId;

    /**
     * 状态
     */
    @EQ
    @ApiModelProperty(value = "状态", required = true)
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    @EQ
    @ApiModelProperty(value = "备注")
    private String remark;


}
